import {Message} from "element-ui";
import { MessageBox } from 'element-ui';

let messageDuration = 2000;

export let message = {
    info(message, duration = messageDuration){
        Message.info({message: message,duration: duration, center: true});
    },
    success(message, duration = messageDuration){
        Message.success({message: message,duration: duration, center: true});
    },
    warning(message, duration = messageDuration){
        Message.warning({message: message,duration: duration, center: true});
    },
    error(message, duration = messageDuration){
        Message.error({message: message,duration: duration, center: true});
    },
};